package com.longbig.service;

import org.flowable.engine.*;

/**
 * @author: yyl
 * @date: 2025/4/14:10:18
 */
public class FlowableTest {

    public static void main(String[] args) {
        // 创建Flowable流程引擎
        ProcessEngine processEngine = ProcessEngineConfiguration
                .createStandaloneProcessEngineConfiguration()
                .buildProcessEngine();

        RepositoryService repositoryService = processEngine.getRepositoryService();
        RuntimeService runtimeService = processEngine.getRuntimeService();

        // 部署流程定义
        repositoryService.createDeployment()
                .addClasspathResource("FinancialReportProcess.bpmn20.xml")
                .deploy();

        // 启动流程实例
        runtimeService.startProcessInstanceById("financialReport");

        TaskService taskService = processEngine.getTaskService();

    }
}
